php forum
php mysql forum
php mysql smarty
 
Topic Options
#239245 - 03/09/03 11:17 AM [6.2] Remove the edit, reply, and quote hyperlinks
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
What is it?: A mod that will remove the edit, reply, and quote hyperlinks if the viewer of a thread does not have reply access to the forum the thread is in. <br /> <br />Instructions attached. Mad props to Astaran for helping me debug the script <img src="/forum/images/graemlins/peace.gif" alt="" /> <br /> <br />Version 1.1 Removes the edit button on a post by post bassis in showflat view. <br /> <br />Update: A more complete mod to remove dead navigation links from all of UBB Threads can be found here.


Attachments
72323-posting_buttons.txt (43 downloads)



Edited by Dalantech (03/18/03 03:14 PM)
_________________________
Da LAN Tech

Threads Dev Moderator

Top
#239246 - 03/10/03 12:37 AM Re: [6.2] Remove the edit, reply, and quote hyperlinks [Re: jacksonm99]
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
I forgot my manners on this one: Props to Gardener for suggesting this mod while I was working on the article templates.
_________________________
Da LAN Tech

Threads Dev Moderator

Top
#239247 - 03/10/03 04:27 PM Re: [6.2] Remove the edit, reply, and quote hyperlinks [Re: jacksonm99]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
<img src="/forum/images/graemlins/yay.gif" alt="" /> nice one <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
- Allen wavey
- What Drives You?

Top
#239248 - 03/11/03 12:17 AM Re: [6.2] Remove the edit, reply, and quote hyperlinks [Re: SurfMinister]
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
Thanks! <img src="/forum/images/graemlins/smile.gif" alt="" /><br /><br />I'd like to see this one make it's way into the official Threads release.
_________________________
Da LAN Tech

Threads Dev Moderator

Top
#239249 - 03/11/03 04:11 PM Re: [6.2] Remove the edit, reply, and quote hyperlinks [Re: jacksonm99]
DLWebmaestro Offline
Addict

Registered: 08/08/00
Posts: 1802
Loc: North Carolina
How do you get this to work if you have installed the Quick Reply hack?

Top
#239250 - 03/12/03 12:33 AM Re: [6.2] Remove the edit, reply, and quote hyperlinks [Re: eslmix]
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
I don't think it would make any difference, since the script for the buttons shouldn't be effected by the quick reply hack.<br /><br />If you want to know how to get rid of the quick reply box if someone doesn't have the right to post to a thread I can look into it for you.
_________________________
Da LAN Tech

Threads Dev Moderator

Top
#239251 - 03/12/03 04:46 PM Re: [6.2] Remove the edit, reply, and quote hyperlinks [Re: jacksonm99]
DLWebmaestro Offline
Addict

Registered: 08/08/00
Posts: 1802
Loc: North Carolina
I've got it figured out. Here is what I did, since I have Quick Reply installed.<br /><br />In showthreaded.tmpl I looked for:<br /><br />[]<br /><table border="0" class="tablesurround"><br /><tr><br /><td class="navigation"><br />$editlinkstart<br /><img src="{$config['images']}/edit.gif" border="0" alt="{$ubbt_lang['PEDIT_HEAD']}" $imagestyle /><br />{$ubbt_lang['EDIT_ICON']}<br />$editlinkstop<br />&nbsp;<br /></td><br /><td class="navigation"><br />$replylinkstart<br /><img src="{$config['images']}/reply.gif" border="0" alt="{$ubbt_lang['REPLY_POST']}" $imagestyle /><br />{$ubbt_lang['REPLY_ICON']}<br />$replylinkstop<br />&nbsp;<br /></td><br /><td class="navigation"><br />$quotelinkstart<br /><img src="{$config['images']}/quote.gif" border="0" alt="{$ubbt_lang['REPLY_POST']}" $imagestyle /><br />{$ubbt_lang['QUOTE_ICON']}<br />$quotelinkstop<br />&nbsp;<br /></td><br /><br /><td class="navigation"><br /><a href="#quickreply"><br /><img src="{$config['images']}/reply.gif" border="0" alt="{$ubbt_lang['QUICK_REPLY']}" $imagestyle /><br />{$ubbt_lang['QUICK_REPLY']}<br /></a><br />&nbsp;<br /></td><br /><br /></tr><br /></table><br />[/]<br />and replaced it with:<br />[]<br />UBBTPRINT;<br /><br />//---------------<br />// Post, Edit, and Reply link start<br /><br />if ($edit == "on") {<br /> <br />echo <<<UBBTPRINT<br /><br /><br /><table border="0" class="tablesurround"><br /><tr><br /><td class="navigation"><br />$editlinkstart<br /><img src="{$config['images']}/edit.gif" border="0" alt="{$ubbt_lang['PEDIT_HEAD']}" $imagestyle /><br />{$ubbt_lang['EDIT_ICON']}<br />$editlinkstop<br />&nbsp;<br /></td><br /><td class="navigation"><br />$replylinkstart<br /><img src="{$config['images']}/reply.gif" border="0" alt="{$ubbt_lang['REPLY_POST']}" $imagestyle /><br />{$ubbt_lang['REPLY_ICON']}<br />$replylinkstop<br />&nbsp;<br /></td><br /><td class="navigation"><br />$quotelinkstart<br /><img src="{$config['images']}/quote.gif" border="0" alt="{$ubbt_lang['REPLY_POST']}" $imagestyle /><br />{$ubbt_lang['QUOTE_ICON']}<br />$quotelinkstop<br />&nbsp;<br /></td><br /><br /><td class="navigation"><br /><a href="#quickreply"><br /><img src="{$config['images']}/reply.gif" border="0" alt="{$ubbt_lang['QUICK_REPLY']}" $imagestyle /><br />{$ubbt_lang['QUICK_REPLY']}<br /></a><br />&nbsp;<br /></td><br /><br /></tr><br /></table><br /><br />UBBTPRINT;<br /><br />}<br /> else {<br /> if ($reply == "on") {<br /> <br />echo <<<UBBTPRINT<br /><br /><table border="0" class="tablesurround"><br /><tr><br /><td class="navigation"><br />$replylinkstart<br /><img src="{$config['images']}/reply.gif" border="0" alt="{$ubbt_lang['REPLY_POST']}" $imagestyle /><br />{$ubbt_lang['REPLY_ICON']}<br />$replylinkstop<br />&nbsp;<br /></td><br /><td class="navigation"><br />$quotelinkstart<br /><img src="{$config['images']}/quote.gif" border="0" alt="{$ubbt_lang['REPLY_POST']}" $imagestyle /><br />{$ubbt_lang['QUOTE_ICON']}<br />$quotelinkstop<br />&nbsp;<br /></td><br /><td class="navigation"><br /><a href="#quickreply"><br /><img src="{$config['images']}/reply.gif" border="0" alt="{$ubbt_lang['QUICK_REPLY']}" $imagestyle /><br />{$ubbt_lang['QUICK_REPLY']}<br /></a><br />&nbsp;<br /></td><br /></tr><br /></table><br /><br />UBBTPRINT;<br /> }<br />}<br /><br />//---------------<br />// Post, Edit, and Reply link stop<br /><br />echo <<<UBBTPRINT<br />[/]<br /><br />In showflat.tmpl I found:<br />[]<br /><table class="tablesurround" border="0"><br /><tr><br /><td class="navigation" nowrap="nowrap"><br />{$postrow[$i]['editlinkstart']}<br /><img src="{$config['images']}/edit.gif" border="0" alt="{$ubbt_lang['PEDIT_HEAD']}" width="21" height="14" $imagestyle /><br />{$ubbt_lang['EDIT_ICON']}<br />{$postrow[$i]['editlinkstop']}<br /> <br /></td><br /><td class="navigation" nowrap="nowrap"><br />{$postrow[$i]['replylinkstart']}<br /><img src="{$config['images']}/reply.gif" border="0" alt="{$ubbt_lang['REPLY_POST']}" width="27" height="14" $imagestyle /><br />{$ubbt_lang['REPLY_ICON']}<br />{$postrow[$i]['replylinkstop']}<br /> <br /></td><br /><td class="navigation" nowrap="nowrap"><br />{$postrow[$i]['quotelinkstart']}<br /><img src="{$config['images']}/quote.gif" border="0" alt="{$ubbt_lang['REPLY_POST']}" width="27" height="14" $imagestyle /><br />{$ubbt_lang['QUOTE_ICON']}<br /><br />UBBTPRINT;<br />if (($user['U_Username']) && (($Open != "C") && ($Open != "M"))) {<br /> $qreplylinkstart = "<a href=\"javascript:quickreply('$i');\">";<br /> $qreplylinkstop = "</a>";<br />} else {<br /> $qreplylinkstart = "";<br /> $qreplylinkstop = "";<br />}<br />echo <<<UBBTPRINT<br /><td class="navigation" nowrap="nowrap"><br />$qreplylinkstart<br /><img src="{$config['images']}/reply.gif" border="0" alt="{$ubbt_lang['QUICK_REPLY']}" width="27" height="14" $imagestyle /><br />{$ubbt_lang['QUICK_REPLY_ICON']}<br />$qreplylinkstop<br /> <br /></td><br /></tr><br /></table><br />[/]<br />and replaced it with:<br />[]<br />UBBTPRINT;<br /><br />//---------------<br />// Post, Edit, and Reply link start<br /><br />if ($postrow[$i]['editlinkstart'] != "") {<br /> <br />echo <<<UBBTPRINT<br /><br /><br /><table class="tablesurround" border="0"><br /><tr><br /><td class="navigation" nowrap="nowrap"><br />{$postrow[$i]['editlinkstart']}<br /><img src="{$config['images']}/edit.gif" border="0" alt="{$ubbt_lang['PEDIT_HEAD']}" width="21" height="14" $imagestyle /><br />{$ubbt_lang['EDIT_ICON']}<br />{$postrow[$i]['editlinkstop']}<br /> <br /></td><br /><td class="navigation" nowrap="nowrap"><br />{$postrow[$i]['replylinkstart']}<br /><img src="{$config['images']}/reply.gif" border="0" alt="{$ubbt_lang['REPLY_POST']}" width="27" height="14" $imagestyle /><br />{$ubbt_lang['REPLY_ICON']}<br />{$postrow[$i]['replylinkstop']}<br /> <br /></td><br /><td class="navigation" nowrap="nowrap"><br />{$postrow[$i]['quotelinkstart']}<br /><img src="{$config['images']}/quote.gif" border="0" alt="{$ubbt_lang['REPLY_POST']}" width="27" height="14" $imagestyle /><br />{$ubbt_lang['QUOTE_ICON']}<br /><br />UBBTPRINT;<br />if (($user['U_Username']) && (($Open != "C") && ($Open != "M"))) {<br /> $qreplylinkstart = "<a href=\"javascript:quickreply('$i');\">";<br /> $qreplylinkstop = "</a>";<br />} else {<br /> $qreplylinkstart = "";<br /> $qreplylinkstop = "";<br />}<br />echo <<<UBBTPRINT<br /><td class="navigation" nowrap="nowrap"><br />$qreplylinkstart<br /><img src="{$config['images']}/reply.gif" border="0" alt="{$ubbt_lang['QUICK_REPLY']}" width="27" height="14" $imagestyle /><br />{$ubbt_lang['QUICK_REPLY_ICON']}<br />$qreplylinkstop<br /> <br /></td><br /></tr><br /></table><br /><br />UBBTPRINT;<br /><br />}<br /> else {<br /> if ($reply == "on") {<br /> <br />echo <<<UBBTPRINT<br /><br /><table class="tablesurround" border="0"><br /><tr><br /><td class="navigation"><br />{$postrow[$i]['replylinkstart']}<br /><img src="{$config['images']}/reply.gif" border="0" alt="{$ubbt_lang['REPLY_POST']}" width="27" height="14" $imagestyle /><br />{$ubbt_lang['REPLY_ICON']}<br />{$postrow[$i]['replylinkstop']}<br />&nbsp;<br /></td><br /><td class="navigation"><br />{$postrow[$i]['quotelinkstart']}<br /><img src="{$config['images']}/quote.gif" border="0" alt="{$ubbt_lang['REPLY_POST']}" width="27" height="14" $imagestyle /><br />{$ubbt_lang['QUOTE_ICON']}<br />{$postrow[$i]['quotelinkstop']}<br />&nbsp;<br /></td><br /></tr><br /></table><br /><br />UBBTPRINT;<br /> }<br />}<br /><br />//---------------<br />// Post, Edit, and Reply link stop<br /><br />echo <<<UBBTPRINT<br />[/]<br /><br />There is also the post button at the top of the postlist page that would be nice to get rid of too - to complete the removal hack. I have tried to get this to work, but alas, my PHP skills are meager. Here is what I've tried, but has not worked. Can someone tell me where I went wrong?<br /><br />In postlist.tmpl I found:<br />[]<br /><table border="0" class="tablesurround"><br /><tr><br /><td class="navigation" nowrap="nowrap"><br /><br /><!-- postoption is either newpost.gif or greynewpost.gif --><br />$newpoststart<br /><img src="{$config['images']}/$postoption" alt="{$ubbt_lang['MAKE_A_NEW']}" border="0" {$images['newpost']} $imagestyle /><br />{$ubbt_lang['NEW_POST_ICON']}<br />$newpoststop<br />&nbsp;<br /></td><br /><td class="navigation" nowrap="nowrap"><br /><!-- prevoption is either previous.gif or greyprevious.gif --><br />$prevstart<br /><img src="{$config['images']}/$prevoption" alt="{$ubbt_lang['PREV_PAGE']}" border="0" {$images['previous']} $imagestyle /><br />{$ubbt_lang['PREV_ICON']}<br />$prevstop<br />&nbsp;<br /></td><br /><td class="navigation" nowrap="nowrap"><br /><a href="{$config['phpurl']}/ubbthreads.php?Cat=$Cat&amp;C=$C"><br /><img src="{$config['images']}/all.gif" alt="{$ubbt_lang['FORUM_IND']}" border="0" {$images['all']} $imagestyle /><br />{$ubbt_lang['INDEX_ICON']}<br /></a><br />&nbsp;<br /></td><br /><td class="navigation" nowrap="nowrap"><br /><!-- nextoption is either next.gif or greynext.gif --><br />$nextstart<br /><img src="{$config['images']}/$nextoption" alt="{$ubbt_lang['NEXT_PAGE']}" border="0" {$images['next']} $imagestyle /><br />{$ubbt_lang['NEXT_ICON']}<br />$nextstop<br />&nbsp;<br /></td><br /><td class="navigation" nowrap="nowrap"><br /><!-- expandoption is either expand.gif or greyexpand.gif --><br />$expandstart<br /><img src="{$config['images']}/$expandoption" alt="{$ubbt_lang['TEXT_EXP']}" border="0" {$images['expand']} $imagestyle /><br />{$ubbt_lang['EXP_ICON']}<br />$expandstop<br />&nbsp;<br /></td><br /><td class="navigation" nowrap="nowrap"><br /><!-- collapseoption is iether collapse.gif or greycollapse.gif --><br />$collapsestart<br /><img src="{$config['images']}/$collapseoption" alt="{$ubbt_lang['TEXT_COLL']}" border="0" {$images['collapse']} $imagestyle /><br />{$ubbt_lang['COL_ICON']}<br />$collapsestop<br />&nbsp;<br /></td><br /></tr><br /></table><br />[/]<br />and replaced it with:<br />[]<br />UBBTPRINT;<br /><br />//---------------<br />// Post link start<br /><br />if ($post == "off") {<br /> <br />echo <<<UBBTPRINT<br /><br /><br /><table border="0" class="tablesurround"><br /><tr><br /><td class="navigation" nowrap="nowrap"><br /><!-- prevoption is either previous.gif or greyprevious.gif --><br />$prevstart<br /><img src="{$config['images']}/$prevoption" alt="{$ubbt_lang['PREV_PAGE']}" border="0" {$images['previous']} $imagestyle /><br />{$ubbt_lang['PREV_ICON']}<br />$prevstop<br />&nbsp;<br /></td><br /><td class="navigation" nowrap="nowrap"><br /><a href="{$config['phpurl']}/ubbthreads.php?Cat=$Cat&amp;C=$C"><br /><img src="{$config['images']}/all.gif" alt="{$ubbt_lang['FORUM_IND']}" border="0" {$images['all']} $imagestyle /><br />{$ubbt_lang['INDEX_ICON']}<br /></a><br />&nbsp;<br /></td><br /><td class="navigation" nowrap="nowrap"><br /><!-- nextoption is either next.gif or greynext.gif --><br />$nextstart<br /><img src="{$config['images']}/$nextoption" alt="{$ubbt_lang['NEXT_PAGE']}" border="0" {$images['next']} $imagestyle /><br />{$ubbt_lang['NEXT_ICON']}<br />$nextstop<br />&nbsp;<br /></td><br /><td class="navigation" nowrap="nowrap"><br /><!-- expandoption is either expand.gif or greyexpand.gif --><br />$expandstart<br /><img src="{$config['images']}/$expandoption" alt="{$ubbt_lang['TEXT_EXP']}" border="0" {$images['expand']} $imagestyle /><br />{$ubbt_lang['EXP_ICON']}<br />$expandstop<br />&nbsp;<br /></td><br /><td class="navigation" nowrap="nowrap"><br /><!-- collapseoption is iether collapse.gif or greycollapse.gif --><br />$collapsestart<br /><img src="{$config['images']}/$collapseoption" alt="{$ubbt_lang['TEXT_COLL']}" border="0" {$images['collapse']} $imagestyle /><br />{$ubbt_lang['COL_ICON']}<br />$collapsestop<br />&nbsp;<br /></td><br /></tr><br /></table><br /><br />UBBTPRINT;<br /><br />}<br /> else {<br /> <br />echo <<<UBBTPRINT<br /><br /><table border="0" class="tablesurround"><br /><tr><br /><td class="navigation" nowrap="nowrap"><br /><br /><!-- postoption is either newpost.gif or greynewpost.gif --><br />$newpoststart<br /><img src="{$config['images']}/$postoption" alt="{$ubbt_lang['MAKE_A_NEW']}" border="0" {$images['newpost']} $imagestyle /><br />{$ubbt_lang['NEW_POST_ICON']}<br />$newpoststop<br />&nbsp;<br /></td><br /><br /><td class="navigation" nowrap="nowrap"><br /><!-- prevoption is either previous.gif or greyprevious.gif --><br />$prevstart<br /><img src="{$config['images']}/$prevoption" alt="{$ubbt_lang['PREV_PAGE']}" border="0" {$images['previous']} $imagestyle /><br />{$ubbt_lang['PREV_ICON']}<br />$prevstop<br />&nbsp;<br /></td><br /><td class="navigation" nowrap="nowrap"><br /><a href="{$config['phpurl']}/ubbthreads.php?Cat=$Cat&amp;C=$C"><br /><img src="{$config['images']}/all.gif" alt="{$ubbt_lang['FORUM_IND']}" border="0" {$images['all']} $imagestyle /><br />{$ubbt_lang['INDEX_ICON']}<br /></a><br />&nbsp;<br /></td><br /><td class="navigation" nowrap="nowrap"><br /><!-- nextoption is either next.gif or greynext.gif --><br />$nextstart<br /><img src="{$config['images']}/$nextoption" alt="{$ubbt_lang['NEXT_PAGE']}" border="0" {$images['next']} $imagestyle /><br />{$ubbt_lang['NEXT_ICON']}<br />$nextstop<br />&nbsp;<br /></td><br /><td class="navigation" nowrap="nowrap"><br /><!-- expandoption is either expand.gif or greyexpand.gif --><br />$expandstart<br /><img src="{$config['images']}/$expandoption" alt="{$ubbt_lang['TEXT_EXP']}" border="0" {$images['expand']} $imagestyle /><br />{$ubbt_lang['EXP_ICON']}<br />$expandstop<br />&nbsp;<br /></td><br /><td class="navigation" nowrap="nowrap"><br /><!-- collapseoption is iether collapse.gif or greycollapse.gif --><br />$collapsestart<br /><img src="{$config['images']}/$collapseoption" alt="{$ubbt_lang['TEXT_COLL']}" border="0" {$images['collapse']} $imagestyle /><br />{$ubbt_lang['COL_ICON']}<br />$collapsestop<br />&nbsp;<br /></td><br /></tr><br /></table><br /><br />UBBTPRINT;<br /> <br />}<br /><br />//---------------<br />// Post link stop<br /><br />echo <<<UBBTPRINT<br />[/]<br />I'm pretty sure, maybe, that I didn't get the variable correct. Is $post correct? I tried all different variables including $newpost, $postoption, and I even got desperate and tried $newpoststart. What else is wrong with it? Lay it on me! <img src="/forum/images/graemlins/grin.gif" alt="" /><br /><br /><br />

Top
#239252 - 03/12/03 11:42 PM Re: [6.2] Remove the edit, reply, and quote hyperlinks [Re: eslmix]
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
I'd have to dig into postlist.php and figure out what variable to use for the check. Looking good on the quick reply <img src="/forum/images/graemlins/cool.gif" alt="" />
_________________________
Da LAN Tech

Threads Dev Moderator

Top
#239253 - 03/18/03 03:13 PM Re: [6.2] Remove the edit, reply, and quote hyperlinks [Re: eslmix]
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
Please see this mod. I've removed all of the possible dead links.
_________________________
Da LAN Tech

Threads Dev Moderator

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks